<?php $__env->startSection('title', '首页'); ?>

<?php $__env->startSection('css'); ?>
    <link href="<?php echo e(loadEdition('/admin/css/pxgridsicons.min.css')); ?>" rel="stylesheet"/>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('content'); ?>

    <div class="row">
        <div class="col-sm-12">
            <div class="ibox-title">
                <h5>
                    <a href="javascript:;" data-toggle="tooltip" data-placement="bottom"
                       title="显示所有游戏所有渠道的实时统计信息">总数据统计</a></h5>
            </div>
            <div class="ibox-content">

                <form class="form-horizontal" action="<?php echo e(route('totalData.stat.sumData')); ?>" method="get"
                      enctype="multipart/form-data">
                    <table class="table-striped table-bordered table-hover table-condensed">
                        <tr class="b-group">
                            <td class="b-child" colspan="2">
                                <table class="table-striped table-bordered table-hover table-condensed">
                                    <tr>
                                        <td>
                                            <?php echo $__env->make('widget.between_datetime',['showEndTime'=>true], array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                                        </td>
                                        <td>
                                            <?php echo $__env->make('widget.query_and_refresh', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                                        </td>
                                        <td>
                                            <?php echo $__env->make('widget.dataType', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                        <tr class="b-group">
                            <th style="min-width: 108px;">
                                <label>全选/不选&nbsp;&nbsp;
                                    <input type="checkbox" checked="checked" value=""
                                           onclick="checkAll(this)"></label>
                            </th>
                            <td class="b-child">
                                <div style="max-height:6.5rem;overflow-y:scroll;">
                                    <?php echo $__env->make('widget.game', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                                </div>
                            </td>
                        </tr>
                    </table>
                </form>

                <table class="table table-bordered table-striped tblData" data-toggle="table"
                       data-pagination="true">
                    <thead>
                    <tr>
                        <th>
                            游戏名称
                        </th>
                        <th>
                            渠道
                        </th>
                        <th>
                            <a href="javascript:;" data-toggle="tooltip" data-placement="top"
                               title="在当日注册,并登录游戏的用户">新增用户</a>
                        </th>
                        <th>
                            <a href="javascript:;" data-toggle="tooltip" data-placement="top"
                               title="当日登录游戏的所有用户">活跃用户</a>
                        </th>
                        <th>
                            <a href="javascript:;" data-toggle="tooltip" data-placement="top"
                               title="当日在游戏内有消费行为的用户">活跃付费用户</a>
                        </th>
                        <th>
                            总收入
                        </th>
                        <th>
                            <a href="javascript:;" data-toggle="tooltip" data-placement="top"
                               title="活跃付费用户 / 活跃用户">活跃付费率</a>
                        </th>
                        <th>
                            <a href="javascript:;" data-toggle="tooltip" data-placement="top"
                               title="总收入 / 活跃用户">ARPU</a>
                        </th>
                        <th>
                            <a href="javascript:;" data-toggle="tooltip" data-placement="top"
                               title="总收入 / 活跃付费用户">ARPPU</a>
                        </th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr style="color: red">
                        <td>
                            全游戏
                        </td>
                        <td>
                            全渠道
                        </td>
                        <td>
                            <?php echo e($sum['new_users']); ?></a>
                        </td>
                        <td>
                            <?php echo e($sum['active_users']); ?>

                        </td>
                        <td>
                            <?php echo e($sum['pay_users']); ?>

                        </td>
                        <td>
                            <?php echo e($sum['total_amounts']); ?>

                        </td>
                        <td>
                            <?php echo e($sum['active_pay_rate']); ?>

                        </td>
                        <td>
                            <?php echo e($sum['arpu']); ?>

                        </td>
                        <td>
                            <?php echo e($sum['arppu']); ?>

                        </td>
                    </tr>
                    <?php
                    $html = '';
                    foreach ($stat as $value) {
                        $html .= "<tr>
                        <td>{$value['game_name']}</td>
                        <td>{$value['channel_name']}</td>
                        <td>{$value['new_users']}</td>
                        <td>{$value['active_users']}</td>
                        <td>{$value['pay_users']}</td>
                        <td>{$value['total_amounts']}</td>
                        <td>{$value['active_pay_rate']}</td>
                        <td>{$value['arpu']}</td>
                        <td>{$value['arppu']}</td>
                        </tr>";
                    }
                    echo $html;
                    ?>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
    </div>
    <link href="<?php echo e(loadEdition('/admin/css/plugins/datapicker/bootstrap-datepicker.css')); ?>" rel="stylesheet">
<?php $__env->stopSection(); ?>
<?php $__env->startSection('js'); ?>
    <script src="<?php echo e(loadEdition('/admin/js/plugins/datapicker/bootstrap-datepicker.js')); ?>"></script>
    <script src="<?php echo e(loadEdition('/admin/js/plugins/datapicker/bootstrap-datepicker.zh-CN.js')); ?>"></script>
    <script src="<?php echo e(loadEdition('/admin/js/plugins/datapicker/bootstrap-datepicker.zh-CN.js')); ?>"></script>
    <!--bootstrap-table start-->
    <script src="<?php echo e(loadEdition('/admin/js/plugins/bootstrap-table/bootstrap-table.min.js')); ?>"></script>
    <script src="<?php echo e(loadEdition('/admin/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.js')); ?>"></script>
    <!--bootstrap-table end-->
    <script src="<?php echo e(loadEdition('/js/global.js')); ?>"></script>
    <script>

    </script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('admin.layouts.layout', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>